<%@ page 
	language="java" 
	contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"
    import="com.example.validate.UserBean"
    %>
<!DOCTYPE html>

<%
	UserBean currentUser = (UserBean)session.getAttribute("currentSessionUser");
%>



<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<style>.error { color: red; }</style>
<link rel="stylesheet" type="text/css" href="lutstyle.css">
<title>Login Page</title>
</head>
<body>
	<h2>Log in</h2>
	<form action="loginServlet">
		<table>
			<tr>
				<td> Please enter your username </td> 		
				<td> <input type="text" name="username"/> </td>		
				<td> <span class="error"> ${errorMessage}</span> </td>
			</tr>
			<tr>
				<td> Please enter your password </td> 		
				<td> <input type="password" name="pwd"/> </td>		
			</tr>
			<tr>
				<td> <a href="recovery.jsp">glemt passord</a>
			</tr>
			<tr>
				<td> <input type="submit" value="submit"> </td>
			</tr>
		</table>
	</form>
	
	<br>
	<hr width="400" align="left">
	
	<h2>Register!</h2>
	
	<p>Not a member? Register now and create your own reviews! </p>
	
	<form action="RegisterServlet" method="post">
		<table>
		<tr>
			<td> Please choose a username </td>
			<td> <input type="text" name="username"/> </td>
			<td> <span class="error">${messages.username}</span> </td>
		</tr>
		<tr>
			<td> Please choose a password* </td>
			<td> <input type="password" name="pwd"/> </td>
			<td> <span class="error">${messages.password}</span> </td>
		</tr>
		<tr>
			<td> Please reenter your password </td>
			<td> <input type="password" name="pwd2"/> </td>
		</tr>
		<tr>
			<td> Please enter your e-mail in case <br>you forget your password </td>
			<td> <input type="text" name="email"/> </td>
			<td> <span class="error">${messages.email}</span> </td>
		</tr>
		<tr>
			<td> <input type="submit" value="submit"> </td>
		</tr>
		</table>
	</form>
	<p> * The password must contain atleast one lowercase letter and one <br> 
		uppercase letter, and must be longer than five characters.</p>
</body>
</html>